#include<iostream>
#include<string>
using namespace std;
void reverse(string num){
  int l=0,r=num.size()-1;
  while (l<=r&&num[l]=='0') l++;
  while (l<=r&&num[r]=='0') r--;
  if(l>r){
    cout<<'0';
    return;
  }
  for(int i=r;i>=l;i--) cout<<num[i];
  return;
}
int main(){
  string num,str="./";
  cin>>num;
  for(auto & x:str){
    int p=num.find(x);
    if(p!=string::npos) {
      reverse(num.substr(0,p));
      cout<<x;
      reverse(num.substr(p+1));
      return 0;
     }  
  }
  if(num.back()=='%'){
    num.pop_back();
    reverse(num);
    cout<<"%"<<endl;
    return 0;
  }
  reverse(num);
  cout<<endl;
}